package com.excellence.utils;

import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.StringJoiner;

/**
 * @author 沈秉璋
 * @ClassName SaveFilesPath
 * @Description  将文件数组传入,返回一个以空格为逗号的地址字符串
 * @date 2024/4/10 14:35
 * @Version 1.0
 */
public class SaveFilesPath {
    public static String saveFilesPath(List<MultipartFile> files){
        StringJoiner paths = new StringJoiner(",");
        for (MultipartFile file : files) {
            paths.add(OSSUtil.uploadFileToOss(file));
        }
        return paths.toString();
    }
}
